﻿@{
    ViewBag.Title = "Wolfy 云盘 登录";
    Layout = null;
}
@model Wolfy.NetDisk.Site.Models.SignInInput
<html>

<head>
    <title>企业网盘</title>
    <meta name="viewport" content="width=device-width,height=device-height, user-scalable=no,initial-scale=1, minimum-scale=1, maximum-scale=1" />
    <meta name="description" content="企业,网盘,企业网盘">
    <script src=@Url.ScriptOrCss("~/Content/Scripts/jquery-1.10.2.min.js")></script>
    <link href=@Url.ScriptOrCss("~/Content/Css/bootstrap.min.css") rel="stylesheet" />
    <link href=@Url.ScriptOrCss("~/Content/Css/font-awesome.css") rel="stylesheet" />
    <link href=@Url.ScriptOrCss("~/Content/Css/animate.css") rel="stylesheet" />
    <link href=@Url.ScriptOrCss("~/Content/Css/Login.css") rel="stylesheet" />
    <script>
        //获取随机数
        function getRandom(n) {
            return Math.floor(Math.random() * n + 1)
        };
        $(function () {
            //获得随机背景图
            var r = getRandom(9);
            r = r > 0 ? r : r + 1;
            window.document.body.style.backgroundImage = "url('/Content/Images/UI/loginbg_0" + r + ".jpg')";

            //验证码单击换一个
            $('#imgVerifyCode').on('click', function () {
                this.src = "/Account/GetVerifyCode?_r=" + getRandom(100000);
            });
        });
    </script>
</head>

<body>

    <div class="middle-box text-center loginscreen animated fadeInDown ">
        <div>
            <div class="logo">
                <img src=@Url.ScriptOrCss("~/Content/Images/logo.png") />
            </div>
            <h3 class="m-t text-white">欢迎使用Wolfy 网盘</h3>
            <br />
            @using (Ajax.BeginForm(new AjaxOptions { HttpMethod = "post", Url = "Account/SignIn" }))
            {

                <div class="form-group">
                    @Html.TextBoxFor(o => o.Name, new { @class = "form-control", placeholder = "用户名" })
                </div>
                <div class="form-group">
                    @Html.PasswordFor(o => o.Password, new { @class = "form-control", placeholder = "密码" })
                </div>
                <div class="form-group">
                    @Html.TextBoxFor(o => o.VerifyCode, new { @class = "form-control", placeholder = "验证码" })
                </div>
                <div class="form-group">
                    <img src=@Url.Content("~/Account/GetVerifyCode") alt="验证码" title="看不清？换一张" id="imgVerifyCode" />
                </div>
                <div class="form-group">
                    @Html.EditorFor(o => o.Remember, new { @class = "m-t text-white" })@Html.LabelFor(o => o.Remember, new { @class = "m-t text-white" })
                </div>
                <div class="form-group">
                    <input type="submit" class="form-control" name="name" value="登   录" />
                </div>
                <div class="form-group">
                    @Html.ActionLink("忘记密码?", "ForgotPassword", null, new { @class = " btn btn-sm btn-white btn-block" })
                </div>
                <div class="form-group">
                    @Html.ActionLink("注册企业帐号", "Register", null, new { @class = "btn btn-sm btn-white btn-block" });
                </div>
                <div class="form-group">
                    <span style="color:red;">
                        @Html.ValidationMessageFor(o => o.Name)
                        @Html.ValidationMessageFor(o => o.Password)
                        @Html.ValidationMessageFor(o => o.VerifyCode)
                        @Html.ValidationSummary(true)
                    </span>
                </div>
            }
            <p class="m-t text-white"> <small>ESC NETDISK © @DateTime.Now.Year 京 B2-20150234-12</small> </p>
        </div>
    </div>
</body>
</html>